const swiperList = [
  `https://s11.ax1x.com/2023/12/14/pihRTTx.png`,
  `https://s11.ax1x.com/2023/12/14/pihWYu9.jpg`,
  `https://s11.ax1x.com/2023/12/14/pihWdN6.png`
];

Component({
  data: {
    current: 0,
    autoplay: false,
    duration: 500,
    interval: 5000,
    swiperList,
    serveArr: [
        {
          image: "https://s11.ax1x.com/2023/12/14/pihfsiV.png",
          name: "报告交通事故",
          info: "报告您目击的交通事故或为您的亲朋好友报警",
        },
        {
          image: "https://s11.ax1x.com/2023/12/14/pihf4d1.png",
          name: "驾/行驶证补换领",
          info: "补办驾驶证行驶证",
        },
        {
          image: "https://s11.ax1x.com/2023/12/14/pihUb7j.png",
          name: "查询禁止通行路段",
          info: "查询附近哪些路无法通行",
        },
      ],
  },

  methods: {
    onTap(e) {
      const { index } = e.detail;

      console.log(index);
    },
    onChange(e) {
      const { current, source } = e.detail;

      console.log(current, source);
    },
    onImageLoad(e) {
      console.log(e.detail.index);
    },
  },
  
});

